#ifndef MDICHILD_H
#define MDICHILD_H

#include <QTextEdit>

class mdiChild : public QTextEdit
{
    Q_OBJECT
public:
    explicit mdiChild(QWidget *parent = 0);
    void newFile();
    bool loadFile(const QString& fileName);
    QString userFriendlyCurrentFile();
    QString getCurrentFileName(){return curFile;};
    bool save();
    bool saveAs();
    bool saveFile(const QString &fileName);
public slots:
    void documentWasModified();
private:
    bool mayBeSave();
    void setCurrentFile(const QString &fileName);
    bool isUntitled;
    QString curFile;

    // QWidget interface
protected:
    void closeEvent(QCloseEvent *event);
};

#endif // MDICHILD_H
